package ${domain}.module.wsys.req;

import ${domain}.frame.base.BaseRequest;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;
import ${domain}.frame.validation.Select;

/**
 * ResCreateRequest - 资源新增
 *
 * @author wangbing
 * @version 0.0.1
 * @since 2017-01-01
 */
public class ResCreateRequest extends BaseRequest {

    /**
     * 资源代码
     */
    @NotBlank(message = "[resCode]资源代码不能为空")
    @Length(min = 0, max = 50, message = "[resCode]资源代码长度不合法(0-50)")
    private String resCode;

    /**
     * 资源名称
     */
    @NotBlank(message = "[resName]资源名称不能为空")
    @Length(min = 0, max = 50, message = "[resName]资源名称长度不合法(0-50)")
    private String resName;

    /**
     * 资源类型.
     * WEB:网页
     * API:终端
     */
    @NotNull(message = "[resType]资源类型不能为NULL")
    @Select({"WEB", "API"})
    private String resType;

    /**
     * 资源内容
     */
    @Length(min = 0, max = 255, message = "[resValue]资源内容长度不合法(0-255)")
    private String resValue;

    /**
     * 是否免费
     */
    private Boolean free;

    /**
     * 是否有效
     */
    @NotNull(message = "[valid]是否有效不能为NULL")
    private Boolean valid;

    public String getResCode() {
        return this.resCode;
    }

    public void setResCode(String resCode) {
        this.resCode = resCode;
    }

    public String getResName() {
        return this.resName;
    }

    public void setResName(String resName) {
        this.resName = resName;
    }

    public String getResType() {
        return this.resType;
    }

    public void setResType(String resType) {
        this.resType = resType;
    }

    public String getResValue() {
        return this.resValue;
    }

    public void setResValue(String resValue) {
        this.resValue = resValue;
    }

    public Boolean getFree() {
        return this.free;
    }

    public void setFree(Boolean free) {
        this.free = free;
    }

    public Boolean getValid() {
        return this.valid;
    }

    public void setValid(Boolean valid) {
        this.valid = valid;
    }
}
